<?php

  // Counter for display
  if ($thisLocation == 'root') {
    $filename1 = "cms/extra/count-display.txt";
  } else {
    $filename1 = "extra/count-display.txt";
  }
  if (file_exists($filename1)) {
    // Get the count value
    $count = file_get_contents($filename1);
  }

  $nummer = rand(1,$count);
  if ($thisLocation == 'root') {
    $filename2 = 'cms/extra/extra' . $nummer . '.txt';
  } else {
    $filename2 = 'extra/extra' . $nummer . '.txt';
  }
  if (file_exists($filename2)) {
    // Get the content
    $content = file_get_contents($filename2);
    $content = stripslashes($content);
    $content = autop($content, 0);
    $content = convert_chars($content, 0);
    echo $content;
  } else {
    echo '<p><small>' . $filename2 . ' not found.</small></p>';
  }

?>